import request from '@/utils/request'

export const getDepartmentList = () => request.get('/company/department')

export const getManagerList = () => request.get('/sys/user/simple')

export const addDepartment = (data) => request({
  method: 'post',
  url: '/company/department',
  data
})

export const getDepartmentDetail = (id) => request.get(`/company/department/${id}`)

export const updateDepartmentDetail = (data) => request({
  method: 'put',
  url: `/company/department/${data.id}`,
  data
})

export const deleteDepartment = (id) => request({
  method: 'delete',
  url: `/company/department/${id}`

})
